package com.xmy.cultivate.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * <p>
 * 发放记录表
 * </p>
 *
 * @author hpiggy
 * @since 2025-02-10
 */
@TableName("book_grant_info")
@ApiModel(value = "BookGrantInfo对象", description = "发放记录表")
@Data
public class BookGrantInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    private Long id;

    private Integer yearPart;

    private Integer quarterNum;

    private Long bookStudentId;

    private String headImg;

    @TableField(fill = FieldFill.INSERT)
    private Long createdId;

    @TableField(exist = false)
    private String teacherName;

    @TableField(exist = false)
    private String studentName;

    @ApiModelProperty("发放的教师或者学生id")
    private Long grantId;

    @ApiModelProperty("4发放到教师，5发放到学生")
    private Integer status;

    @ApiModelProperty("发放时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createdAt;

    @TableField(exist = false)
    private Long bookTextId;

    @TableField(exist = false)
    private Long studentId;

    @TableField(exist = false)
    private Long subjectsId;

}
